<?php
require '../../../zb_system/function/c_system_base.php';
require '../../../zb_system/function/c_system_admin.php';
$zbp->Load();
$action='root';
if (!$zbp->CheckRights($action)) {$zbp->ShowError(6);die();}
if (!$zbp->CheckPlugin('CommentSet')) {$zbp->ShowError(48);die();}

$blogtitle='评论权限设置';
require $blogpath . 'zb_system/admin/admin_header.php';
require $blogpath . 'zb_system/admin/admin_top.php';

if($_POST && isset($_POST)){
  $zbp->Config('CommentSet')->level=$_POST['level'];
  $zbp->Config('CommentSet')->showtip=$_POST['showtip'];
	$zbp->SaveConfig('CommentSet');
	$zbp->ShowHint('good');
  //Redirect('./main.php');
}
?>
<div id="divMain">
  <div class="divHeader"><?php echo $blogtitle;?></div>
  <div class="SubMenu">
    <a href="main.php" ><span class="m-left m-now">基本设置</span></a>
    <a href="../../plugin/AppCentre/main.php?auth=3ec7ee20-80f2-498a-a5dd-fda19b198194"><span class="m-left">作者作品</span></a>
    <a href="http://www.yiwuku.com/diy-zblog.html" target="_blank"><span class="m-left">定制服务</span></a>
    <a href="http://www.yiwuku.com/" target="_blank"><span class="m-right">作者网站</span></a>
  </div>
  <div id="divMain2">
<style type="text/css">
.xtips{color:#999;margin-left:15px}
div.xtips{line-height:1.5;padding:6px 0;}
</style>
	<form id="form1" name="form1" method="post">	
    <table class="tb-set" width="100%">
        <tr height="70">
            <td colspan="2"><strong>《评论权限设置》</strong>插件提示您：可以随时通过作者作品链接关注当前插件更新情况，以防错过更佳体验；</td>
        </tr>
        <tr height="70">
            <td width="160" align="right"><b>允许评论会员等级：</b></td>
            <td>
              <select name="level">
                  <option value='6' <?php if ($zbp->Config('CommentSet')->level == 6) {
                      echo 'selected="selected"'; }?>><?php echo $zbp->lang['user_level_name'][6];?></option>
                  <option value='5' <?php if ($zbp->Config('CommentSet')->level == 5) {
                      echo 'selected="selected"'; }?>><?php echo $zbp->lang['user_level_name'][5];?></option>
                  <option value='4' <?php if ($zbp->Config('CommentSet')->level == 4) {
                      echo 'selected="selected"';
          }?>><?php echo $zbp->lang['user_level_name'][4];?></option>
                  <option value='3' <?php if ($zbp->Config('CommentSet')->level == 3) {
                      echo 'selected="selected"';
          }?>><?php echo $zbp->lang['user_level_name'][3];?></option>
          <option value='2' <?php if ($zbp->Config('CommentSet')->level == 2) {
                      echo 'selected="selected"';
          }?>><?php echo $zbp->lang['user_level_name'][2];?></option>
              </select>

            <span class="xtips">级别以上（含），选择游客则为不限制，了解<a href="http://www.yiwuku.com/a/19922.html" target="_blank">会员等级介绍</a></span></td>
        </tr>
        <tr height="70">
            <td align="right"><b>被禁止评论时提示：</b></td>
            <td><textarea name="showtip" cols="60" rows="6" style="vertical-align:middle" title="填写纯文字将在评论框起始位显示，留空无提示不影响限制功能"><?php echo $zbp->Config('CommentSet')->showtip; ?></textarea><span class="xtips">含HTML标签时在评论框处居中显示</span></td>
        </tr>
        <tr>
            <td height="80">&nbsp;</td>
            <td valign="top"><input type="submit" name="submit" value="保存设置"></td>
        </tr>
        <tr>
            <td colspan="2"><div class="xtips">敬请注意：<br>该插件不依赖《<a href="../../plugin/AppCentre/main.php?id=1558" target="_blank">登录和注册</a>》插件，但配合使用效果更佳[<a href="http://www.yiwuku.com/site/index.php/134.html#divCommentPost" target="_blank">演示</a>]，默认提示内容中链接可直接启用其登录/注册框，不配合使用时可去掉该链接；<br>提示基于评论框自动定位显示，出现错位时建议只填写纯文字。彻底关闭全站评论功能可通过系统网站设置->评论设置实现；<br>成品应用仅为满足大众化需求，如需个性化修改或有其它需求欢迎 <a href="http://wpa.qq.com/msgrd?v=3&uin=77940140&site=qq&menu=yes" target="_blank">联系作者</a> 定制；</div></td>
        </tr>
    </form>
  </div>
</div>
<script type="text/javascript">AddHeaderIcon("<?php echo $bloghost . 'zb_users/plugin/CommentSet/logo.png';?>");</script> 
<?php
require $blogpath . 'zb_system/admin/admin_footer.php';
RunTime();
?>
